package com.temple.web;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;

@Slf4j
@EnableCaching
@SpringBootApplication
@MapperScan(basePackages = "com.template.mapper")
@ComponentScan(basePackages = {"com.temple.web.controller","com.temple.service","com.temple.comfig","com.temple.common.omponents","com.template.config"})
public class WebApplication  extends SpringBootServletInitializer  {


	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(WebApplication.class);
	}

	public static void main(String[] args) {
		log.error("开始启动----------------------------");
		SpringApplication.run(WebApplication.class, args);
		log.error("启动结束-----------------------------");
	}



}
